*{
    box-sizing: border-box;
}
body{
    background-color: #eafbff;
    background-image: linear-gradient(to bottom, #eafbff 0%,
    #eafbff 50%,#5290f0 50%,#5290f0);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    height: 100vh;
}
nav{
    background-color: white;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,.3);
    transition: width 0.6s linear;
    overflow-x: hidden;
}
nav.active{
    width: 350px;
}
nav ul{
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 0;
    transition: width 0.6s linear;

}
nav.active ul{
    width: 100%;
}

nav ul li{
    transform: rotateX(0deg);
    opacity: 0;
    transition: transform 0.6s linear,opacity 0.6s linear;
}
nav.active ul li{
    opacity: 1;
    transform: rotateX(360deg);
}
nav ul a{
    position: relative;
    margin: 0 10px;
    color: black;
    text-decoration: none;

}
.icon{
    background-color: white;
    border: 0;
    cursor: pointer;
    position: relative;
    height: 30px;
    width: 30px;
    padding: 0;
}
.icon .line{
    background-color: #5290f0;
    height: 2px;
    width: 20px;
    position: absolute;
    top: 10px;
    left: 5px;
    transition: transform 0.6s linear;
}
.icon .line2{
    top: auto;
    bottom: 10px;
}
nav.active .icon .line1{
    transform: rotate(-765deg) translateY(5.5px);
}
nav.active .icon .line2{
    transform: rotate(765deg) translateY(-5.5px);
}